package org.act.BPEL2Automata.automata.module;

/**
 * <b>TransitionMatrix</b> designed for <b>calBisimulation</b> method 
 * of <b>AutomataImp</b>.It's a 2D Array to hold <b>StatePair</b>s.
 * @author baoxiwu<bb@feijiao.info>,ACT,Beihang University
 * @version 0.9.0
 * @since 2010-04-29
 * 
 */
public class TransitionMatrix {
	private final int MATRIX_SIZE = 255;
	private StatePair[][] matrix = new StatePair[MATRIX_SIZE][MATRIX_SIZE];
	public TransitionMatrix(){
	//empty
	}
	
	//TODO improvements WANTED.
	public void add(int x,int y,StatePair sp){
		try{
			this.matrix[x][y] = sp;
		} catch(Exception e){
			//System.out.println(x + " " + y);
		}
	}
	
	
	public StatePair get(int x,int y){
		try{
			return this.matrix[x][y];
		} catch(Exception e){
			return null;
		}
		
	}
}
